<template>
    <i class="iconfont icon-container" :class="className"></i>
</template>

<script>
const classMap = {
    home: 'icon-zhuye',
    success: 'icon-chenggong',
    error: 'icon-tishicuowu',
    close: 'icon-guanbi',
    warn: 'icon-jinggao',
    info: 'icon-xinxi',
    blog: 'icon-blog',
    code: 'icon-code',
    about: 'icon-set_about_hov',
    weixin: 'icon-weixin',
    mail: 'icon-Email',
    github: 'icon-github-fill',
    qq: 'icon-QQ-circle-fill',
    arrowUp: 'icon-xiangshang',
    arrowDown: 'icon-xiangxia',
    empty: 'icon-empty',
    chat: 'icon-liuyan',
    top:'icon-huidaodingbu',
};
export const types = Object.keys(classMap);
export default {
    props: {
        type: {
            type: String,
            required: true,
        }
    },
    computed: {
        // 图标类样式
        className() {
            return classMap[this.type];
        }
    }
}
</script>


<style lang="less" scoped>

@import url('//at.alicdn.com/t/c/font_4946035_o3k07kazzb.css');

.icon-container {
    color: inherit;
    font-size: inherit;
    cursor: pointer;
}
</style>